shortcuts: the accelerator should always be LTR
authorChristian Hergert <chergert@redhat.com>
Mon, 10 Oct 2016 20:52:50 +0000 (13:52 -0700)
committerChristian Hergert <chergert@redhat.com>
Mon, 10 Oct 2016 20:56:48 +0000 (13:56 -0700)
Even on RTL languages, we want the shortcut to be LTR so that we always
have <control> to the left of the accel keyval.

https://bugzilla.gnome.org/show_bug.cgi?id=772695

gtk/gtkshortcutlabel.c

index 905a27ba7cbeb860365d627d165218b1305f975b..bfacbd391ea468599c1153a2ce955b6201ea6926 100644 (file)
@@ -499,6 +499,9 @@ static void
 gtk_shortcut_label_init (GtkShortcutLabel *self)
 {
   gtk_box_set_spacing (GTK_BOX (self), 6);
+
+  /* Always use LTR so that modifiers are always left to the keyval */
+  gtk_widget_set_direction (GTK_WIDGET (self), GTK_TEXT_DIR_LTR);
 }
 
 /**